/*
*    Phantom Test Driver v2.0 GUI Automation Software
*    Copyright (C) 2009  John C. Van Arsdall (john@phantomtest.com)
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License along
*    with this program; if not, write to the Free Software Foundation, Inc.,
*    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
/*
 * PTDImageLoader.java
 *
 * Created on January 14, 2006, 3:14 PM
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package ptd;

import javax.swing.ImageIcon;

/**
 *
 * @author John
 */
public class PTDImageLoader {
    
    public static int IMG_PTD_ICON = 0;
    
    public static int IMG_NEW_SCRIPT = 1;
    public static int IMG_NEW_SUITE = 2;
    
    public static int IMG_OPEN_SCRIPT = 3;
    public static int IMG_OPEN_SUITE = 4;

    public static int IMG_SAVE_SCRIPT = 5;
    public static int IMG_SAVE_SUITE = 6;
    
    public static int IMG_RUN_SCRIPT = 7;
    public static int IMG_RUN_SUITE = 8;
    
    public static int IMG_RECORD_SCRIPT = 9;
    public static int IMG_RECORD_DECL = 10;

    public static int IMG_SUITE_ICON = 11;
    public static int IMG_TESTCASE_ICON = 12;

    public static int IMG_CUR_LINE = 13;
    public static int IMG_BPT_LINE = 14;
    
    public static int IMG_DEBUG_SCRIPT = 15;
    
    public static int IMG_DECL_FILE = 16;
    public static int IMG_DECL_ICON = 17;
    
    public static int IMG_TAB_SCRIPT = 18;
    
    public static int IMG_SAVE_ALL = 19;
    public static int IMG_OPEN_DECL = 20;
    public static int IMG_SAVE_DECL = 21;
    public static int IMG_STOP_SCRIPT = 22;
    public static int IMG_TOGGLE_BPT = 23;
    public static int IMG_STEP_OVER = 24;
    public static int IMG_STEP_INTO = 25;
    public static int IMG_STEP_OUT = 26;
    public static int IMG_STOP_DEBUG = 27;
    public static int IMG_CONTINUE = 28;
    
    public static int IMG_SPLASH_SCREEN = 29;
    public static int IMG_DISPOSE = 30;
    
    public static int IMG_PTD_LABEL = 31;
    
    public static int IMG_FUNCTION_ICON = 32;
    public static int IMG_FUNCTIONSET_ICON = 33;
    public static int IMG_VARIABLE_ICON = 34;
    public static int IMG_MEMBER_ICON = 35;
    
    /** Creates a new instance of PTDImageLoader */
    public PTDImageLoader() {
    }
    
    public static ImageIcon getImageIcon(String fileName){
        //Main.debug_out("Image is file: " + Main.getImageDir() + fileName);
        ImageIcon Ret = new ImageIcon(Main.getImageDir() + fileName);
        if(Ret==null){
            Main.debug_out("Error Creating Image Icon");
        }
        return Ret;
    }
    
    public static ImageIcon getImageIcon(int ID){
        if      (ID == IMG_PTD_ICON){
            return getImageIcon("/ptd_icon.gif");
        }else if(ID == IMG_NEW_SCRIPT){
            return getImageIcon("/new_script.gif");
        }else if(ID == IMG_NEW_SUITE){
            return getImageIcon("/new_suite.gif");
        }else if(ID == IMG_OPEN_SCRIPT){
            return getImageIcon("/open_script.gif");
        }else if(ID == IMG_OPEN_SUITE){
            return getImageIcon("/open_suite.gif");
        }else if(ID == IMG_SAVE_SCRIPT){
            return getImageIcon("/save_script.gif");
        }else if(ID == IMG_SAVE_SUITE){
            return getImageIcon("/save_suite.gif");
        }else if(ID == IMG_RUN_SCRIPT){
            return getImageIcon("/run_script.gif");
        }else if(ID == IMG_RUN_SUITE){
            return getImageIcon("/run_suite.gif");
        }else if(ID == IMG_RECORD_SCRIPT){
            return getImageIcon("/rec_script.gif");
        }else if(ID == IMG_RECORD_DECL){
            return getImageIcon("/rec_decl.gif");
        }else if(ID == IMG_SUITE_ICON){
            return getImageIcon("/suite_icon.gif");
        }else if(ID == IMG_TESTCASE_ICON){
            return getImageIcon("/testcase_icon.gif");
        }else if(ID == IMG_CUR_LINE){
            return getImageIcon("/cur_line.gif");
        }else if(ID == IMG_BPT_LINE){
            return getImageIcon("/bpt_line.gif");
        }else if(ID == IMG_DEBUG_SCRIPT){
            return getImageIcon("/debug_script.gif");
        }else if(ID == IMG_DECL_FILE){
            return getImageIcon("/decl_file.gif");
        }else if(ID == IMG_DECL_ICON){
            return getImageIcon("/decl_icon.gif");
        }else if(ID == IMG_TAB_SCRIPT){
            return getImageIcon("/tab_script.gif");
        }else if(ID == IMG_SAVE_ALL){
            return getImageIcon("/save_all.gif");
        }else if(ID == IMG_OPEN_DECL){
            return getImageIcon("/open_decls.gif");
        }else if(ID == IMG_SAVE_DECL){
            return getImageIcon("/save_decls.gif");
        }else if(ID == IMG_STOP_SCRIPT){
            return getImageIcon("/stop_script.gif");
        }else if(ID == IMG_TOGGLE_BPT){
            return getImageIcon("/toggle_bpt.gif");
        }else if(ID == IMG_STEP_OVER){
            return getImageIcon("/step_over.gif");
        }else if(ID == IMG_STEP_INTO){
            return getImageIcon("/step_into.gif");
        }else if(ID == IMG_STEP_OUT){
            return getImageIcon("/step_out.gif");
        }else if(ID == IMG_STOP_DEBUG){
            return getImageIcon("/stop_debug.gif");
        }else if(ID == IMG_CONTINUE){
            return getImageIcon("/continue.gif");            
        }else if(ID == IMG_SPLASH_SCREEN){
            return getImageIcon("/splash_screen.jpg");
        }else if(ID == IMG_DISPOSE){
            return getImageIcon("/dispose.gif");
        }else if(ID == IMG_PTD_LABEL){
            return getImageIcon("/ptd_label.gif");
        }else if(ID == IMG_FUNCTION_ICON){
            return getImageIcon("/function_icon.gif");
        }else if(ID == IMG_FUNCTIONSET_ICON){
            return getImageIcon("/functionset_icon.gif");
        }else if(ID == IMG_VARIABLE_ICON){
            return getImageIcon("/variable_icon.gif");
        }else if(ID == IMG_MEMBER_ICON){
            return getImageIcon("/member_icon.gif");
        }

        
        return null;
    }
    
}
